#include "../src/socket.hpp"

int main()
{
    Socket client_sock;
    client_sock.CreateClient("127.0.0.1", 9000);

    for(int i = 0; i < 5; ++i)
    {
        // 发送数据
        std::string str = "hello this is client";
        client_sock.Send(str.c_str(), str.size());
        // 接收数据
        char buffer[1024] = {0};
        client_sock.Recv(buffer, 1023);
        DBG_LOG("%s", buffer);
        sleep(1);
    }

    while (true)
    {
        sleep(1);
    }

    return 0;
}